* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style-type: none;
}
html {
  font-size: 10px;
}
body {
  width: 100%;
  min-width: 250px;
}
#navbar {
  width: 300px;
  height: 100%;
  padding: 20px;
  border-right: 3px solid #ccc;
  font-size: 2rem;
  position: fixed;
  min-width: 250px;
  top: 0;
  left: 0;
  background-color: #fff;
}

#navbar header {
  font-size: 5rem;
  font-weight: 700;
  text-align: center;
}
#navbar ul {
  height: 88%;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
#navbar li {
  color: #4d4e53;
  border-top: 1px solid;
  list-style: none;
  position: relative;
  width: 100%;
}
#navbar li a {
  display: block;
  padding: 10px 30px;
  color: #4d4e53;
  text-decoration: none;
  cursor: pointer;
}

#main-doc {
  position: absolute;
  margin-left: 310px;
  padding: 0 20px;
  font-size: 1.5rem;
  /* border: 2px solid #ccc; */
}

.main-section {
  margin: 30px 10px;
  /* width: 100%; */
  border-bottom: 1px solid #ccc;
  padding-bottom: 20px;
}
.main-section header {
  font-size: 3rem;
  font-weight: 700;
  margin: 10px 10px;
}
.main-section li {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 10px;
}
.main-section p {
  margin: 5px 0px;
  text-indent: 3rem;
  line-height: 2.5rem;
}
.main-section code {
  color: white;
  background-color: black;
  display: block;
  text-align: left;
  white-space: pre-line;
  position: relative;
  word-break: normal;
  word-wrap: normal;
  line-height: 2;
  padding: 15px;
  margin: 10px;
  border-radius: 5px;
}

/* 媒体查询 */
@media only screen and (max-width: 815px) {
  /* For mobile phones: */
  #navbar ul {
    border: 1px solid;
    height: 207px;
  }

  #navbar {
    background-color: white;
    position: absolute;
    top: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    max-height: 275px;
    border: none;
    z-index: 100;
    border-bottom: 2px solid;
  }

  #main-doc {
    position: relative;
    margin-left: 0px;
    margin-top: 270px;
  }
}

@media only screen and (max-width: 400px) {
  #main-doc {
    margin-left: -10px;
  }

  code {
    margin-left: -20px;
    width: 100%;
    padding: 15px;
    padding-left: 10px;
    padding-right: 45px;
    min-width: 233px;
  }
}
